import 'whatwg-fetch'


let options = {
  username:'007292',
  password:'1'
}

fetch('/api/v2/book/1220562', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  mode: 'cors',
  credentials:'include',
  cache: 'default',
  body: JSON.stringify(options)
}).then(res=>{
  console.log(res.headers.get('Content-Type'))
  return res.json()
}).then(data=>{
  console.log(data)
}).catch(err=>{
  console.log(err)
})
